package com.googlecode.vmock.matchers;

/**
 * A matcher that matches all values which are NOT equal to a given value.
 * <p>
 * This matcher is null-safe.
 * 
 * @author marcin.jagus
 */
public class NotMatcher extends NegationMatcher {

    /**
     * Given value.
     */
    private Object value;

    /**
     * Creates a matcher that matches all values being not equal to a given value.
     * 
     * @param value Given value. May be null.
     */
    public NotMatcher(Object value) {
        super(new EqualsMatcher(value));
    }

    @Override
    public String toString() {
        return String.format("NotMatcher(%s)", value);
    }
}
